package com.macro.mall.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fly.mapper.${modelNameUpperCamel}Mapper;
import com.fly.entity.${modelNameUpperCamel};
import com.fly.service.${modelNameUpperCamel}Service;
import org.springframework.stereotype.Service;


/**
 * ${remarks}接口实现
 *
 * @author ${author}
 * @date ${date}
 */
@Service
public class ${modelNameUpperCamel}ServiceImpl extends ServiceImpl<${modelNameUpperCamel}Mapper, ${modelNameUpperCamel}>  implements ${modelNameUpperCamel}Service {

    @Override
    public Page<${modelNameUpperCamel}> fetchList(Integer pageNum, Integer pageSize, ${modelNameUpperCamel} ${modelNameLowerCamel}) {
        QueryWrapper<${modelNameUpperCamel}> wrapper = new QueryWrapper<>(${modelNameLowerCamel});
        wrapper.orderByDesc("id");
        return this.page(new Page<>(pageNum, pageSize), wrapper);
    }
}
